import { defHttp } from "@/utils/http";
export const processInstanceApi = {
	//获取我的流程列表
	processInstanceMyPage: async (params?: any) => {
		return await defHttp.get({ url: "/bpm/process-instance/my-page", params });
	},
	//重新发起
	processDefinition: async (id?: any) => {
		return await defHttp.get({ url: `/bpm/process-definition/get?id=${id}` });
	},
	//取消流程
	processInstanceCancelByStartUser: async (params?: any) => {
		return await defHttp.delete({ url: `/bpm/process-instance/cancel-by-start-user`, params });
	},
	//流程实例
	processInstanceManagerPage: async (params?: any) => {
		return await defHttp.get({ url: "/bpm/process-instance/manager-page", params });
	},
	//取消流程实例
	processInstanceManagerCancelByStartUser: async (params?: any) => {
		return await defHttp.delete({ url: `/bpm/process-instance/cancel-by-admin`, params });
	}
};
